var indexBanner = Vue.extend({
data(){
  return{
    imgArr:[
    'http://www.gzuar.com/images/banner3.jpg',
    'https://img001.hc360.cn/m8/M05/0C/45/wKhQplVXXzWESoZ_AAAAAONd_jU455.jpg',
    'https://cbu01.alicdn.com/img/ibank/2015/275/558/2565855572_1791519178.jpg',
    'http://img64.chem17.com/9/20140819/635440831738543348918.jpg'

    ]
  };
},
mounted: function() {
    this.$nextTick(function() {
        //this.jiaZai()
        this.banner();
    });
},
methods: {
    /*
    jiaZai(){ //JS动态加载
        if(MiniSite.Browser.ie){
            //动态加载Js
            MiniSite.JsLoader.load("http://cdn.jsdelivr.net/gh/kenwheeler/slick@1.8.1/slick/slick.min.js",function(){
                $(function(){
                    console.log("slick@1.8.1动态加载完成");
                });
            });   
        }else{
            //动态加载Js
            MiniSite.JsLoader.load("http://cdn.jsdelivr.net/gh/kenwheeler/slick@1.8.1/slick/slick.min.js",function(){
                $(function(){
                    console.log("slick@1.8.1动态加载完成");
                });
            }); 
        }
    },
    */

    banner(){
        $('.banner').slick({
            dots: true,
            autoplay:true,
            arrows:false,
            autoplaySpeed:3000,
        });
    }
},

template:'\
<section class="banner">\
    <div v-for="(item, index) in imgArr"><a href="index.html"><img v-bind:src="item" alt=""></a></div>\
</section>\
',

});

